Telegram Group Search
Building AI Text-to-Video Model From Scratch

# What My Project Does

This project aims to create a small-scale text-to-video model that can generate videos based on text prompts.

# Target audience

This project is designed for individuals who want to learn how to create their own text-to-video model from scratch but don't know where to start. It will provide a basic guide from beginning to end, covering everything from generating the training data to training a model and using that trained model to generate AI videos.

# Comparison

Currently available text-to-video models require high computational power, and their complex code makes it difficult for Rookie developers to understand the practical implementation, beyond just the theory. To address this, I have created a small-scale GAN architecture, similar to text-to-video models, which can be trained on a CPU or a single T4 GPU.

# GitHub

Code, documentation, and example can all be found on GitHub:

https://github.com/FareedKhan-dev/AI-text-to-video-model-from-scratch

/r/Python
https://redd.it/1dez1ru
Friday Daily Thread: r/Python Meta and Free-Talk Fridays

# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!

## How it Works:

1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

## Guidelines:

All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.

## Example Topics:

1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟

/r/Python
https://redd.it/1dfdinp
Is the following api view follows good practice or is that to much ?! Any advice is appreciated.

https://preview.redd.it/rrdnpg05ge6d1.png?width=1501&format=png&auto=webp&s=a1954b36a4258097e1c8a6db24eaafa821521bf7



/r/django
https://redd.it/1df8zcw
I want to build an ecommerce and make it live to public for use. What should I learn?

I know basic Django and HTML, CSS and JavaScript. What are the things that I should learn to build a robust ecommerce live website. Please tell me. (Should I go for React and Postgres, what are the prerequisites for learning these?). What should I learn before going to Postgres and Is there any need for learning Postgres? What is ORM?

/r/django
https://redd.it/1dff8zz
[R] Lamini.AI introduces Memory Tuning: 95% LLM Accuracy, 10x Fewer Hallucinations

https://www.lamini.ai/blog/lamini-memory-tuning

* Lamini Memory Tuning is a new way to embed facts into LLMs that improves factual accuracy and reduces hallucinations to previously unachievable levels — for one Fortune 500 customer, Lamini Memory Tuning led to 95% accuracy compared to 50% with other approaches. Hallucinations were reduced from 50% to 5%.
* Lamini Memory Tuning is a research breakthrough that overcomes a seeming paradox in the AI world: achieving precise factual accuracy (i.e. no hallucinations) while upholding the generalization capabilities that make LLMs valuable in the first place.
* The method entails tuning millions of expert adapters (e.g. LoRAs) with precise facts on top of any open-source LLM, like Llama 3 or Mistral 3. If the goal is to get Roman Empire facts exactly right, Lamini Memory Tuning would create experts on Caesar, aqueducts, legions, and any other facts you provide. Inspired by information retrieval, the model retrieves only the most relevant experts from an index at inference time — not all the model weights — so latency and cost are dramatically lower. High accuracy, high speed, low cost: with Lamini Memory Tuning, you don’t have to choose.

Research paper: https://github.com/lamini-ai/Lamini-Memory-Tuning/blob/main/research-paper.pdf

/r/MachineLearning
https://redd.it/1dffyfs
AI code review in your IDE

Introducing Wasps

Get instant AI code review directly inside VS Code, powered by AI and Gitsecure code security engine.

Think of Wasps as Grammarly, but for code. The Alpha version is currently available, and it’s completely free.

Here’s what Wasps can do for you:

Generate code summaries
Perform code quality analysis
Conduct code security analysis
Provide fix recommendations

Your feedback is important to me! Help me build Wasps by installing it using the link below.

https://marketplace.visualstudio.com/items?itemName=Gitsecure.wasps

https://i.redd.it/6hroz0we1h6d1.gif



/r/django
https://redd.it/1dfjf0b
I ported Rust's Regex Library To Python, but the time taken by the compile parameter was high.

(.venv) PS D:\flpc> python .\seed\test.py
Operation | flpc (ms) | re (ms)
----------------------------------
Compile | 1496.18077 | 0.00000
Search | 19.67597 | 1721.07339
Find Match | 15.62524 | 16.72506
Full Match | 15.62500 | 0.00000
Split | 0.00000 | 1722.88108
Find All | 3.02815 | 1660.32910
Find Iter | 5.96547 | 1672.50776
Sub | 0.00000 | 1548.61116
Subn | 6.70719 | 1676.84698
Escape | 4.87757 | 0.00000
(.venv) PS D:\flpc>

flpc is the name of the library. I named it (spelt as flacpuc). The strange thing is that why the compile time is high of flpc (rust) than of re module (implemented in Pure-Python) (it does the same thing what re.compile does in Python). The benchmark is done on:

PATTERN = r'(\w+)\s+(\d+)'
TEXT = ''.join(choices(ascii_letters + digits, k=1000))
# choices function from random module
ITERATIONS = 100


The problem is that, the python should be slow in the parameter (Regex Compile). However, the rest of parameters looks great!

/r/Python
https://redd.it/1dfl5ja
R Explore the Limits of Omni-modal Pretraining at Scale

https://preview.redd.it/x3bpxf3owh6d1.jpg?width=1001&format=pjpg&auto=webp&s=7987e30b8446af9de5ca97de3a87e60355ebf81c

Paper: https://arxiv.org/abs/2406.09412
Code: https://github.com/invictus717/MiCo
Project Website: https://invictus717.github.io/MiCo/

Abstract
We aim to build omni-modal intelligence capable of understanding any modality and learning universal representations. Specifically, we propose a large-scale omni-modal pretraining paradigm called Multimodal Context (MiCo), which introduces more modalities, data, and model parameters during pretraining. Leveraging MiCo, our pretrained models exhibit impressive performance in multimodal learning, evaluated across three main categories of tasks: 1) single-modality perception benchmarks of 10 different modalities, 2) 25 cross-modal understanding tasks including retrieval, Q&A, and description, and 3) 18 multimodal large language model benchmarks. MiCo achieved 37 state-of-the-art records. We sincerely hope this research contributes to the development of omni-modal intelligence.

Figure 1. Omnimodal Pretraining

The Proposal of Large-Scale omni-modal Pretraining

In the evolution of AI, large-scale pretraining has emerged as a promising approach to achieving general intelligence (e.g., GPT-4, LLaMA, Stable Diffusion). Among these, image-text contrastive learning (e.g., CLIP) has been one of the most influential pretraining methods, expanding to more data modalities (audio, point cloud) and deeper semantic understanding (LLaVA, VideoChat). However, in this era of multimodality and AIGC, the limited image-text pretrained base models face challenges including multimodal misalignment, misunderstanding, hallucination, and bias amplification, which hinder coherent multimodal understanding.

Therefore, we aim to propose

/r/MachineLearning
https://redd.it/1dfm06d
D Discussing Apple's Deployment of a 3 Billion Parameter AI Model on the iPhone 15 Pro - How Do They Do It?

Hey everyone,

So, I've been working with running the Phi-3 mini locally, and honestly, it's been a bit of a ok . Despite all the tweaks and structured prompts in model files, it was normal, especially considering the laggy response times on a typical GPU setup. I was recently checking Apple's recent on -device model, they've got a nearly 3 billion parameter AI model running on an iPhone 15 Pro!

It's a forward in what's possible with AI on mobile devices. They’ve made up some tricks to make this work, and I just wanted to have discussion to dive into these with you all:

1. Optimized Attention Mechanisms: Apple has significantly reduced computational overhead by using a grouped-query-attention mechanism. This method batches queries, cutting down the necessary computations.
2. Shared Vocabulary Embeddings: Honestly I don't have much idea about this - I need to understand it more
3. Quantization Techniques: Adopting a mix of 2-bit and 4-bit quantization for model weights has effectively lowered both the memory footprint and power consumption.
4. Efficient Memory Management: dynamic loading of small, task-specific adapter are that can be loaded into the foundation model to specialize its functions without retraining the core parameters. These adapters are lightweight and used only

/r/MachineLearning
https://redd.it/1dfoykx
I made an MMORPG with Python & Telegram in 4 weeks

well, kind of.

I made Pilgram, an infinite idle RPG where your character goes on adventures and notifies you when stuff happens.

# What my project does

The bot provides a text interface with wich you can "play" an MMO RPG, it's basically an online idle adventure game

# Target audience

It's a toy project that i made out of boredom, also it sounded cool

# Comparison

I never heard of anything like this except for some really old browser games. Maybe i'm just not informed.

# More info

How is it infinite? The secret is AI. Every quest and event in the game is generated by AI depending on the demand of the players, so in theory you can go on an infinite amount of quests.

Why did i call it an MMO? Because you can kind of play with your friends by creating & joining guilds and by sending gifts to eachother. There even is a guild leaderboard to see who gets the most points :)

The interface is exclusively text based, but the command interpreter i wrote is pretty easy to integrate in other places, even in GUIs if anyone wants to try.

I tried out a lot of new things for this project, like using ORMs, writing unit

/r/Python
https://redd.it/1dftgrl
I Trained an LLM on My WhatsApp Chats to Impersonate Me P

I recently had an idea: what if I fine-tuned a large language model (LLaMA-3-8B) using years of my WhatsApp chat history to see if it could impersonate the way I write messages?

First, I downloaded my chat history. WhatsApp has a feature that lets you export chat history in plain text (.txt format). After downloading the data, I did some light pre-processing (like removing extremely long messages) but kept it mostly raw to retain authenticity. I formatted the messages using HTML tags to enclose both the sender's and receiver's messages, and I set the maximum context length to 2048.

I ended up with 200K individual messages—plenty of data for the LLM to "learn" my messaging style. I chose LLaMA-3-8B because it's currently one of the best models out there (I suppose). The fine-tuning process took about an hour.

The results were unexpectedly good! I tried chatting with the LLM and let it reply as me. It did an amazing job impersonating me. To take it a step further, I created a Python script using Selenium that opens WhatsApp Web, listens for any new messages, and automatically type replies using the LLM. My AI successfully fooled my friends into believing they were talking to

/r/MachineLearning
https://redd.it/1dfti9v
Looking for a Freelance Django Developer

I'm interested in hiring a freelance Django developer to help with a passion project of mine that I have been working on for a few years. It is a law practice management application: matters, contacts, tasks, time entries, expense entries, etc. I am an attorney; most of the off-the-rack offerings in this area are unfortunately very bad.

I've been working on the project for a few years, and much of the core functionality is already built, but of course I have a long list of features and improvements that I'd like to implement. In addition, as an amateur developer, I could really use the perspective of someone who actually knows what they're doing.

I can pay an hourly rate consistent with the market. A quick Google search gives a pretty broad range of $38-88. But I can't necessarily budget for a lot of hours in the first month or two. It would maybe be just 20 hours or so. However, as time goes by, if I can find someone who meshes well with me, I may be able to increase that.

So my question is threefold. First, is it even possible to find someone who would be interested in a project

/r/django
https://redd.it/1dfrkz0
Came to say; I love you FLASK

I was trying to learn Django ever since I got into Python in 2020. I had ups and downs with Python as I just want to get out and build something, so I’d say I never truly learned the basics. So I always struggled with Django because of it but I kept trying. Always following tutorials, never building anything on my own. Fast forward to early 2024, I decided to step away from Python related things and switch to Rails (always hear it’s good for quickly building things so I though cool, I can skip Ruby, again nope!) built some very simple web pages using scaffold with it but never deployed anything. Went to build a more complex app and hit a brick wall.

Flash forward to May-June decide to go back to the roots and learn python. Did the whole CS50P course, felt confident but didn’t want to be confused with all the Django extras. So I decided Flask. I love it. GPT is helping me a little bit but for the most part just playing around and building a blog with a dashboard with authentication and it’s so nice. Limited files to flip back and forth through (for

/r/flask
https://redd.it/1dfvd7m
Saturday Daily Thread: Resource Request and Sharing! Daily Thread

# Weekly Thread: Resource Request and Sharing 📚

Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!

## How it Works:

1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.

## Guidelines:

Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.

## Example Shares:

1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.

## Example Requests:

1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.

Share the knowledge, enrich the community. Happy learning! 🌟

/r/Python
https://redd.it/1dg4zxe
Where/how to include non-web activities in a Flask app?

Just getting up to speed with Flask and am not clear where and how to include app functionality that is not tied to the web UI.

Presume I have a simple Flask based cron job 'like' app. I want to create and manage functionality through the Flask UI. But I also want to add the ability to 1. monitor and detect the addition of files to a specific directory, and 2. continually watch for tasks that are due to be processed...

Can I build this functionality directly into a standard Flask app?

Separate apps: I presume I could build separate python apps dedicated to these tasks, have then grab relevant info from a shared database, and then call a route on the Flask app to trigger something. In doing so I would have 2-3 apps running - Flask, a timer event monitor, and a directory monitor.

The timer and directory monitors seem small and simple enough that I would like to have them within the Flask app where the activities are administratively managed through the UI rather than setting up separate apps. Is the UI code blocking such that I would need to spin up a Thread

/r/flask
https://redd.it/1dfx80o
SelectField in Flask-Admin

Hello guys. I am developing a CRUD admin panel for my API using flask-admin package. I wanted to add a selectfield to the create form, but as you can see in the image below, the selectfield does not appear, it appears as textinput. Where am I doing wrong? I would be very glad if you could help me, thank you.

https://preview.redd.it/axy2dcvndi6d1.png?width=2592&format=png&auto=webp&s=f5f3582503c2b05cd363add6556d3718f9364037

# Custom job view
class JobView(MyModelView):
column_list = ('id', 'account_name', 'api_key', 'keyword_list', 'instructions', 'language', 'search_tweet_limit', 'num_tweets', 'sleep_time')
form_columns = ['account_name', 'api_key', 'keyword_list', 'instructions', 'language', 'search_tweet_limit', 'num_tweets', 'sleep_time']

def create_form(self, obj=None):
form = super(JobView, self).create_form(obj)
# Populate account_name choices
form.account_name = SelectField('Account Name', choices=[(account.auth_info_1, account.auth_info_1) for account in Account.query.all()], widget=Select2Widget(), validators=[DataRequired()])
form.keyword_list.description = "Each keyword should be separated by a comma."


/r/flask
https://redd.it/1dfn29f
Python automation ideas

Hi I’m looking for inspiration for some stupid python automation projects. If you have done something funny or stupid using python automation I would love to hear it.


/r/Python
https://redd.it/1dg4cof
Introducing Temporal Adjusters: Simplify Time Series Adjustments in Python!

Hey guys!

I'm excited to introduce Temporal Adjusters, a new Python package designed to make time series adjustments easier and more efficient. If you work with time series data, you'll find this tool incredibly useful for various temporal adjustments.

# What my project does

Adjusters are a key tool for modifying temporal objects. They exist to externalize the process of adjustment, permitting different approaches, as per the strategy design pattern. Temporal Adjuster provides tools that help pinpoint very specific moments in time, without having to manually count days, weeks, or months. In essence, a Temporal Adjuster is a function that encapsulates a specific date/time manipulation rule. It operates on a temporal object (representing a date, time, or datetime) to produce a new temporal object adjusted according to the rule. Examples might be an adjuster that sets the date avoiding weekends, or one that sets the date to the last day of the month.

## Installation

You can install Temporal Adjuster using pip:

pip install temporal-adjuster

## Usage

This package provides a set of predefined temporal adjusters that can be used to adjust a temporal object in various ways. For example:

>>> from datetime import date, datetime



/r/Python
https://redd.it/1dg4fkv
2024/06/15 09:29:01
Back to Top
HTML Embed Code: